package org.example.server.controller;

import lombok.extern.slf4j.Slf4j;
import org.example.common.result.Result;
import org.example.dto.DoctorDTO;
import org.example.server.service.DoctorService;
import org.example.vo.DoctorVO;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Slf4j
@RestController
@RequestMapping("/api/v1/doctor")
public class DoctorController {


    @Resource
    private DoctorService doctorService;

    @PostMapping("/detail")
    private Result<DoctorVO> getDoctorDetail(@RequestBody DoctorDTO doctorDTO) {
log.info("医生详情查询");
        DoctorVO doctorVO = doctorService.selectByDoctor(doctorDTO);
        return Result.success(doctorVO);

    }
}
